﻿<UserControl x:Class="SlotDuino.UI.Controls.SlotCard"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             xmlns:converter="clr-namespace:SlotDuino.Converter"
             d:DesignWidth="418.036" d:DesignHeight="126">
    <UserControl.Resources>
        <converter:TimeSpanToLaptime x:Key="TimeSpanToLaptime" />
    </UserControl.Resources>
    <Grid>
    	<Grid.RowDefinitions>
    		<RowDefinition/>
    		<RowDefinition Height="22.05"/>
    	</Grid.RowDefinitions>
    	<Grid.ColumnDefinitions>
    		<ColumnDefinition Width="130.845"/>
    		<ColumnDefinition Width="0.77*"/>
    		<ColumnDefinition Width="0.23*"/>
    	</Grid.ColumnDefinitions>
        <Border x:Name="Header" HorizontalAlignment="Stretch" VerticalAlignment="Top" Width="Auto" Height="30" BorderBrush="{x:Null}" BorderThickness="0,0,0,0" CornerRadius="8,8,0,0" Grid.ColumnSpan="3">
            <Border.Background>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Offset="0" Color="{Binding Color}" />
                    <GradientStop Offset="0.5" Color="#FF4E4C4C" />
						<GradientStop Offset="0.65" Color="#FF4E4C4C" />
                    <GradientStop Offset="1" Color="{Binding Color}" />
                </LinearGradientBrush>
            </Border.Background>
        </Border>
        <Border x:Name="Body" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Background="#FF4D4D4D" BorderBrush="#FF151813" BorderThickness="2,2,2,2" CornerRadius="0,0,8,8" Margin="0,30,0,-4" Grid.ColumnSpan="3" Grid.RowSpan="2" />
        <Path HorizontalAlignment="Left" Margin="1,71,0,0" Width="212.536" Fill="#FFFBF9F9" Stretch="Fill" Stroke="#FFFDFBFB" StrokeThickness="2" Data="M202,79 C412,78 413,78 413,78" Height="2" VerticalAlignment="Top" Grid.Column="1"/>
            
        <TextBlock Margin="8,8.95,0,0" TextWrapping="NoWrap" Text="{Binding LapCount}" FontSize="64" TextAlignment="Center" Foreground="White" Background="#FF333333" Name="txtLapCount" MinWidth="120" HorizontalAlignment="Left" VerticalAlignment="Top" MinHeight="95" />
        <TextBlock x:Name="txtPilotName" Text="{Binding PilotName}" TextWrapping="NoWrap" Margin="39,4,-24.036,0" VerticalAlignment="Top" Height="22" Foreground="White" FontWeight="Bold" FontSize="16" d:LayoutOverrides="HorizontalAlignment" FontFamily="Segoe UI" Grid.Column="1"/>
        <TextBlock VerticalAlignment="Top" TextWrapping="Wrap" Margin="1,33,0,0" FontSize="32" Foreground="#FFFDFDFD" HorizontalAlignment="Left" Width="101.63" Grid.Column="1" d:LayoutOverrides="HorizontalAlignment"><Run Language="pt-br" Text="Última: "/></TextBlock>
        <TextBlock Text="{Binding Path=LastLap, Converter={StaticResource TimeSpanToLaptime}}" TextWrapping="NoWrap" Margin="106.63,33,0,0" Foreground="#FFFBFBFB" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="32" Width="106.906" Name="txtLastLap" Grid.Column="1" />
        <TextBlock VerticalAlignment="Top" TextWrapping="Wrap" Margin="1,72,0,0" FontSize="21.333" Foreground="#FFF7F6F6" HorizontalAlignment="Left" d:LayoutOverrides="HorizontalAlignment" Text="Melhor:" Grid.Column="1"></TextBlock>
        <TextBlock Text="{Binding Path=BestLap, Converter={StaticResource TimeSpanToLaptime}}" TextWrapping="NoWrap" Margin="106.63,74,0,0" FontSize="21.333" Foreground="#FFFDFDFD" VerticalAlignment="Top" HorizontalAlignment="Left" Width="106.906" Height="25.353" Name="txtBestLap" Grid.Column="1" />
        <!--
        <TextBlock TextWrapping="Wrap" Margin="1,0.866,0,5.04" FontSize="13.333" Foreground="#FFF7F2F2" HorizontalAlignment="Left" Grid.Column="1" Grid.Row="1" d:LayoutOverrides="Height"><Run Language="pt-br" Text="Restam:"/></TextBlock>
        <TextBlock Text="{Binding TimeLeft}" TextWrapping="NoWrap" Margin="53.61,2.476,0,5.04" FontSize="12" Foreground="#FFF7F4F4" HorizontalAlignment="Left" Width="55" Name="txtTimeLeft" Grid.Column="1" d:LayoutOverrides="HorizontalAlignment, Height" Grid.Row="1" />
        -->
        <TextBlock Text="Tensão: " TextWrapping="Wrap" Margin="136,0.906,0,5" FontSize="13.333" Foreground="#FFF4F2F2" HorizontalAlignment="Left" Grid.Column="1" Grid.Row="1" d:LayoutOverrides="Height"/>
        <TextBlock Text="{Binding Voltage}" TextWrapping="NoWrap" Margin="191,2.516,0,5" FontSize="12" Foreground="#FFFBFAFA" HorizontalAlignment="Left" Width="23" Name="txtVoltage" Grid.Column="1" Grid.Row="1" d:LayoutOverrides="Height" />
        <TextBlock Text="POS" Margin="13.036,42.13,15,0" FontSize="18.667" Foreground="#FFF7F2F2" VerticalAlignment="Top" Grid.Column="2"/>
        <TextBlock Text="{Binding Position}" Margin="18.036,-47.04,15,0" FontSize="48" Foreground="#FFFFFFFF" VerticalAlignment="Top" Panel.ZIndex="20" Height="64" Name="txtPosition" Grid.Column="2" Grid.Row="1" />
    </Grid>
</UserControl>